const crypto = require('crypto');

function md5Password(password) {
    const md5 = crypto.createHash('md5');

    // 用md5对密码加密并转化成16进制格式
    return md5.update(password).digest('hex');
}

module.exports = md5Password;